package club.qwertyzzz;

import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

public class App 
{
    public static void main( String[] args ) throws InterruptedException {
        TankFrame tankFrame = new TankFrame();

        Integer initTankCount = Integer.parseInt((String) PropertyMgr.get("initTankCount"));

        // 初始化敌方坦克
        for(int i = 0; i < initTankCount; i++) {
            tankFrame.getEnemyTanks().add(new Tank(50 + i * 70, 200, Dir.DOWN, true, TankType.enemy1, tankFrame));
        }

        // 不断重绘窗口
        while(true) {
            Thread.sleep(15);
            tankFrame.repaint();
        }
    }
}
